package com.feihua.starter.service.impl;

import com.feihua.starter.service.api.ApiHdbMsgPoService;
import com.feihua.starter.service.mapper.HdbMsgPoMapper;
import com.feihua.starter.service.modules.hdb.dto.HdbMsgDto;
import com.feihua.starter.service.modules.hdb.dto.SearchHdbMsgsConditionDto;
import com.feihua.starter.service.modules.hdb.po.HdbMsgPo;
import com.github.pagehelper.Page;
import feihua.jdbc.api.pojo.PageResultDto;
import feihua.jdbc.api.service.impl.ApiBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * This class was generated by MyBatis Generator.
 * @author revolver 2018-06-29 22:26:31
 */
@Service
public class ApiHdbMsgPoServiceImpl extends ApiBaseServiceImpl<HdbMsgPo, HdbMsgDto, String> implements ApiHdbMsgPoService {
    @Autowired
    HdbMsgPoMapper hdbMsgPoMapper;

    public ApiHdbMsgPoServiceImpl() {
        super(HdbMsgDto.class);
    }

    @Override
    public PageResultDto<HdbMsgDto> searchHdbMsgsDsf(SearchHdbMsgsConditionDto dto, feihua.jdbc.api.pojo.PageAndOrderbyParamDto pageAndOrderbyParamDto) {
        Page p = super.pageAndOrderbyStart(pageAndOrderbyParamDto);
        List<HdbMsgDto> list = this.wrapDtos(hdbMsgPoMapper.searchs(dto));
        return new PageResultDto(list, this.wrapPage(p));
    }
}